/**
 * Copyright 2020 Vercel Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.loading {
  display: inline-flex;
  align-items: center;
  --loading-dots-height: auto;
  --loading-dots-size: 2px;
  height: var(--loading-dots-height);
}

.loading .spacer {
  margin-right: var(--space-3x);
}

.loading span {
  animation-name: blink;
  animation-duration: 1.4s;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  width: var(--loading-dots-size);
  height: var(--loading-dots-size);
  border-radius: 50%;
  background-color: var(--accents-6);
  display: inline-block;
  margin: 0 1px;
}

.loading.reverse span {
  background-color: var(--accents-2);
}

.loading span:nth-of-type(2) {
  animation-delay: 0.2s;
}

.loading span:nth-of-type(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0.2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}
